package com.szjlc.torna.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.hibernate.validator.constraints.Length;


/**
 * 客户表(t_customer)实体类
 * @author makejava
 * @since 2022-11-19 22:01:09
 */

@ApiModel(value = "客户表(t_customer)实体类", description = "")
@SuppressWarnings("all")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class Customer implements Serializable {

    private static final long serialVersionUID = -57288522197856511L;

    /** 客户编号id，主键 */
    @ApiModelProperty(value = "客户编号id，主键")
    @NotNull(groups = {Update.class, Delete.class})
    @Min(value = 1, message = "客户编号不能小于1")
    private Integer customerId;

    /** 客户名称 */
    @ApiModelProperty(value = "客户名称")
    @NotBlank(message = "客户名称不能为空")
    private String customerName;

    /** 联系人 */
    private String contacts;

    /** 联系人电话 */
    @Length(min = 11, max = 11)
    private String phoneNumber;

    /** 客户地址 */
    private String address;

    /** 备注 */
    private String remarks;

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.JSON_STYLE);
    }

    public interface Save {

    }

    public interface Update {

    }

    public interface Delete {

    }
}
